package com.example.compreshensiveshop.dao;

import com.example.compreshensiveshop.po.CustomerPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

@Mapper
public interface CustomerDao {
    /**
     * 查询用户信息
     *
     * @param customerId
     * @return
     */
    CustomerPO queryMessage(@Param("customerId") Long customerId);

    /**
     * 修改用户信息
     *
     * @param customerPO
     */
    void updateMessage(@Param("customerPO") CustomerPO customerPO);

    /**
     * 修改用户头像
     *
     * @param customerId
     * @param avatarUrl
     */
    void updateAvatar(@Param("customerId") Long customerId, @Param("avatarUrl") String avatarUrl);

    /**
     * 查询用户id
     *
     * @param customerId
     * @return
     */
    CustomerPO queryById(@Param("customerId") Long customerId);

    /**
     * 查询用户id
     *
     * @param id
     * @return
     */
    Long queryCustomerId(@Param("id") Long id);

    /**
     * 添加用户
     *
     * @param id
     */
    void addCustomer(@Param("id") Long id);

    /**
     * 查询用户地址
     *
     * @param customerId
     * @return
     */
    String queryCustomerAddress(@Param("customerId") Long customerId);
}
